package com.xkk.mapper;

import com.xkk.pojo.Employee;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface EmployeeMapper {
//    @Select("select*from employee")
    List<Employee> selectAllEmployee();
    //根据id查询员工信息
//    @Select("select*from employee where id = #{id}")
    Employee selectEmployeeById(int id);
    //添加一个员工信息
//    @Insert("insert into employee (lastName,email,gender,birth,department) values(#{lastName},#{email},#{gender},#{birth},#{department)} ")
    int addEmployee(Employee employee);
    //修改一个员工信息
//    @Update("update employee set id=#{id},lastName=#{lastName},email=#{email},gender=#{gender},birth=#{birth},department=#{department} where id = #{id}")
    int updateEmployee(Employee employee);
    //根据id删除员工信息
//    @Delete("delete from employee where id=#{id}")
    int deleteEmployee(int id);
}
